# Maintainer: Florian Pritz <bluewind@xinu.at>

pkgname=perl-net-dns-resolver-mock
pkgver=1.20171219
pkgrel=2
pkgdesc='Mock a DNS Resolver object for testing'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl-net-dns)
makedepends=('perl>=5.6')
url=https://metacpan.org/release/Net-DNS-Resolver-Mock
source=("http://search.cpan.org/CPAN/authors/id/M/MB/MBRADSHAW/Net-DNS-Resolver-Mock-$pkgver.tar.gz")
md5sums=(a63fbe22f39676df034e02486b3d3f83)
sha512sums=(4c028edc162e7dbf5804d19f35e761086933bf1fbfc84182ad2ab0f3db356ff3f30c280e734e4c85f737ff377350149c559459c0c77d36ef3313c96c1bf046c8)
_ddir="Net-DNS-Resolver-Mock-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
